package com.ckex.learn.lucene.dao.page;

import java.io.Serializable;
import java.util.ArrayList;
import java.util.Collection;

/**
 * @author ckex created 2013-10-7 - 下午2:10:00 PageList.java
 * @explain -
 */
public class PageList<T> extends ArrayList<T> implements Serializable {

    public PageList() {
        paginator = new Paginator();
    }

    public PageList(Collection<T> c) {
        this(c, null);
    }

    public PageList(Collection<T> c, Paginator paginator) {
        super(c);
        this.paginator = paginator != null ? paginator : new Paginator();
    }

    public Paginator getPaginator() {
        return paginator;
    }

    public void setPaginator(Paginator paginator) {
        if (paginator != null)
            this.paginator = paginator;
    }

    private static final long serialVersionUID = 4323066128057985942L;
    private Paginator         paginator;
}
